package com.lzj.server.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author Lzj
 * @date 2025/5/22
 * @description 基础公共实体类
 */
@Data
public abstract class   BaseEntity implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @Schema(description = "创建时间",hidden = true)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间",hidden = true)
    private LocalDateTime updateTime;

    @TableLogic
    @TableField(value = "is_deleted")
    @Schema(description = "逻辑删除：0-未删除，1-已删除",hidden = true)
    private Integer isDeleted;
}
